<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <title></title>
<link rel="stylesheet" href="${pageContext.request.contextPath}/static/css/css.css">

<!-- bootstrap & fontawesome -->
<link rel="stylesheet" href="<%=request.getContextPath()%>/ace/assets/css/bootstrap.min.css" />
<link rel="stylesheet" href="<%=request.getContextPath()%>/ace/assets/font-awesome/4.5.0/css/font-awesome.min.css" />
<!-- text fonts -->
<!-- ace styles -->
<link rel="stylesheet" href="<%=request.getContextPath()%>/ace/assets/css/ace.min.css" class="ace-main-stylesheet" id="main-ace-style" />
<link rel="stylesheet" href="<%=request.getContextPath()%>/static/alert/jquery-confirm.min.css" />
<!--[if !IE]> -->
<script src="<%=request.getContextPath()%>/ace/assets/js/jquery-2.1.4.min.js"></script>

<!-- <![endif]-->
<script src="<%=request.getContextPath()%>/static/alert/jquery-confirm.min.js"></script>
<link rel="stylesheet"
	href="<%=request.getContextPath()%>/static/jquery-validate/css/form.css" />
</head>
<body>
<div class="breadcrumbs" id="breadcrumbs">

		<c:if test="${not empty msg}">
			<div id="myAlert" class="alert alert-warning">
				<a href="#" class="close" data-dismiss="alert">&times;</a>
				<strong>警告！</strong>${msg }。
			</div>
		</c:if>
		<!-- /.breadcrumb -->

	</div>

	<!-- /section:basics/content.breadcrumbs -->
	<div class="page-content">
		<!-- /section:settings.box -->
		<div class="page-content-area">
			<div class="page-header">
				<h1>
					部门管理
				</h1>
			</div>
			<!-- /.page-header -->

			<div class="row">
				<div class="col-xs-12">
					<!-- PAGE CONTENT BEGINS -->
				    <form:form id="form" method="post" class="form-horizontal" commandName="child">
				        <form:hidden path="id"/>
				        <form:hidden path="available"/>
				        <form:hidden path="parent_id"/>
				        <form:hidden path="parent_ids"/>
						<fieldset disabled>
					        <div class="form-group">
					            <label class="col-sm-2 control-label">父节点名称：</label>
					            <div class="col-sm-10">
					            	<input type="text" value="${parent.name}" class="form-control"/>
					            </div>
					        </div>
						</fieldset>
				        <div class="form-group">
				            <form:label path="name" class="col-sm-2 control-label">子节点名称：</form:label>
				            <div class="col-sm-10">
				            	<form:input path="name" required="true" class="form-control"/>
				            </div>
				        </div>
				
				        <form:button class="btn btn-default col-sm-offset-2">新增子节点</form:button>
				    </form:form>
				   		<!-- PAGE CONTENT ENDS -->
				</div>
				<!-- /.col -->
			</div>
			<!-- /.row -->
		</div>
		<!-- /.page-content-area -->
</body>
<script type="text/javascript">
		$().ready(function() {
			  $("#form").validate();
			 });
		</script>
		<script src="<%=request.getContextPath()%>/ace/assets/js/jquery.validate.min.js" type="text/javascript"></script>
		<script src="http://static.runoob.com/assets/jquery-validation-1.14.0/dist/localization/messages_zh.js"></script>
</html>